// index.js
// 获取应用实例
let dataList = require('../../data/index.js');//引入本地创建的json对象
const app = getApp()

Page({
  data: {
    img: ["../../asset/banner/xiaomi.jpg", "../../asset/banner/watches.jpg", "../../asset/banner/ipad.jpg", "../../asset/banner/jd.png", "../../asset/banner/buy.jpg", "../../asset/banner/Aveeno.jpg",],
    indicatorDots: true,//是否显示面板指示点
    vertical: false,//滑动方向是否为纵向
    autoplay: true,//是否自动切换
    interval: 2000,//
    circular: true,//是否采用衔接滑动
  },
  //根据页面来加载本地模拟的json数据
  onLoad: function () {
    // this.getdata()
    this.setData({
      dataList: dataList.jsonData[0].iconTitle,
      contentList: dataList.jsonData[0].contentTitleArray,
    })
  },
  getdata: function () {
    // let that=this;

  },
  ///点击查看详情
  particulars: function (e) {
    // var kind = e.target.id
    var index = e.currentTarget.dataset.index
    console.log(e.currentTarget.dataset);
    console.log(index);
    wx.navigateTo({
      url: '../market/market',
      url: '../particulars/particulars?index=' + index

    })
  }
})
